/*
 * @Author: 0x9DEFA478
 * @Date: 2025-06-21 22:34:59
 * @LastEditTime: 2025-10-03 21:03:02
 * @LastEditors: 0x9DEFA478
 * @Description: 
 * 
 */
#include "./C_LocalUTF8.hpp"
#include "../SystemAPI/Windows/Encoding.hpp"




namespace H{

  std::string Local_To_UTF8(const std::string& localString)noexcept{
    
#if defined(_WIN32)
    return SystemAPI::Windows::TextEncodeConvert(localString,GetConsoleCP(),CP_UTF8);
#else
    return localString;
#endif
  }

  std::string LocalSystem_To_UTF8(const std::string& localString)noexcept{
    
#if defined(_WIN32)
    return SystemAPI::Windows::TextEncodeConvert(localString,CP_ACP,CP_UTF8);
#else
    return localString;
#endif
  }

  std::string UTF8_To_Local(const std::string& utf8String)noexcept{
    
#if defined(_WIN32)
    return SystemAPI::Windows::TextEncodeConvert(utf8String,CP_UTF8,GetConsoleOutputCP());
#else
    return utf8String;
#endif
  }

  std::string UTF8_To_LocalSystem(const std::string& utf8String)noexcept{
    
#if defined(_WIN32)
    return SystemAPI::Windows::TextEncodeConvert(utf8String,CP_UTF8,CP_ACP);
#else
    return utf8String;
#endif
  }

}



